<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="../../baselist.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>

<body>
<form name="icform" method="post">
    <div id="menubar">
        <div id="middleMenubar">
            <div id="innerMenubar">
                <div id="navMenubar">
                    <ul>
                        <li id="view"><a href="#" onclick="formSubmit('exportAction_toview','_self');this.blur();">查看</a></li>
                        <li id="update"><a href="#" onclick="formSubmit('exportAction_toupdate','_self');this.blur();">修改</a></li>
                        <li id="delete"><a href="#" onclick="formSubmit('exportAction_delete','_self');this.blur();">删除</a></li>
                        <li id="new"><a href="#" onclick="formSubmit('exportAction_submit','_self');this.blur();">提交</a></li>
                        <li id="new"><a href="#" onclick="formSubmit('exportAction_cancel','_self');this.blur();">取消</a></li>
                        <li id="work_assign"><a href="#" onclick="formSubmit('exportAction_exportE','_self');this.blur();">电子报运</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="textbox-title">
        <img src="${ctx }/skin/default/images/icon/currency_yen.png"/>
        出口报运列表
    </div>

    <div>


        <div class="eXtremeTable">
            <table id="ec_table" class="tableRegion" width="98%">
                <thead>
                <tr>
                    <td class="tableHeader"><input type="checkbox" name="selid" onclick="checkAll('id',this)"></td>
                    <td class="tableHeader">序号</td>
                    <td class="tableHeader">报运号</td>
                    <td class="tableHeader">货物数/附件数</td>
                    <td class="tableHeader">信用证号</td>
                    <td class="tableHeader">收货人及地址</td>
                    <td class="tableHeader">装运港</td>
                    <td class="tableHeader">目的港</td>
                    <td class="tableHeader">运输方式</td>
                    <td class="tableHeader">价格条件</td>
                    <td class="tableHeader">制单日期</td>
                    <td class="tableHeader">状态</td>
                </tr>
                </thead>
                <tbody class="tableBody">
                ${links}

                <c:forEach items="${results}" var="o" varStatus="status">
                    <tr class="odd" onmouseover="this.className='highlight'" onmouseout="this.className='odd'">
                        <td><input type="checkbox" name="id" value="${o.id}"/></td>
                        <td>${status.index+1}</td>
                        <td>${o.id}</td>
                        <td align="center">
                                ${fn:length(o.exportProducts)}
                            /
                            <c:set var="extNumber" value="0"></c:set><!-- 设置一个变量，用来累加，初始值0 -->
                            <c:forEach items="${o.exportProducts}" var="ep">
                                <c:if test="${fn:length(ep.extEproducts)!=0 }">
                                    <c:set var="extNumber" value="${extNumber +fn:length(ep.extEproducts)}"/>
                                </c:if>
                            </c:forEach>
                                ${extNumber}
                        </td>
                        <td>${o.lcno}</td>
                        <td>${o.consignee}</td>
                        <td>${o.shipmentPort}</td>
                        <td>${o.destinationPort}</td>
                        <td>${o.transportMode}</td>
                        <td>${o.priceCondition}</td>
                        <td><fmt:formatDate value="${o.inputDate }" pattern="yyyy-MM-dd"/></td>
                        <td>
                            <c:if test="${o.state==0}">草稿</c:if>
                            <c:if test="${o.state==1}">已上报</c:if>
                            <c:if test="${o.state==2}">已报运</c:if>
                        </td>
                    </tr>
                </c:forEach>

                </tbody>
            </table>
        </div>

    </div>


</form>
</body>
</html>

